home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / UNIX Cracking / MacCracSource.sit / MacCrac.source / Source / crack.h < prev    next >
Text File  |  1995-01-20  |  2KB  |  80 lines

  1. /*
  2.  * This program is copyright Alec Muffett 1991 except for some portions of
  3.  * code in "crack-fcrypt.c" which are copyright Robert Baldwin, Icarus Sparry
  4.  * and Alec Muffett.  The author(s) disclaims all responsibility or liability
  5.  * with respect to it's usage or its effect upon hardware or computer
  6.  * systems, and maintain copyright as set out in the "LICENCE" document which
  7.  * accompanies distributions of Crack v4.0 and upwards.
  8.  */
  9.  
  10. #include <stdio.h>
  11. #include <ctype.h>
  12. #include "pwd.h"
  13. #include <signal.h>
  14. #include <stdlib.h>
  15. #include <time.h>
  16. #include <string.h>
  17. #include <strings.h>
  18.  
  19. #include "conf.h"
  20.  
  21. #define STRINGSIZE    256
  22.  
  23. #ifdef DEVELOPMENT_VERSION
  24. #define BUILTIN_CLEAR
  25. #undef BRAINDEAD6
  26. #define CRACK_UNAME
  27. #endif
  28.  
  29. extern void Trim ();
  30. extern char *Reverse ();
  31. extern char *Uppercase ();
  32. extern char *Lowercase ();
  33. extern char *Clone ();
  34. extern char *Mangle ();
  35. extern int gethostname ();
  36.  
  37. #ifdef FAST_TOCASE
  38. #define CRACK_TOUPPER(x)    (toupper(x))
  39. #define CRACK_TOLOWER(x)    (tolower(x))
  40. #else
  41. #define CRACK_TOUPPER(x)    (islower(x) ? toupper(x) : (x))
  42. #define CRACK_TOLOWER(x)    (isupper(x) ? tolower(x) : (x))
  43. #endif
  44.  
  45. #ifdef FCRYPT
  46. #define crypt(a,b)        fcrypt(a,b)
  47. #endif
  48.  
  49. #ifdef INDEX_NOT_STRCHR
  50. #define strchr(a,b)         index(a,b)
  51. #endif
  52.  
  53. struct USER
  54. {
  55.     struct USER *next;        /* next users with different salt */
  56.     struct USER *across;    /* line of users with same salt */
  57.     char *filename;        /* where we got it from */
  58.     char *passwd_txt;        /* plaintext of password */
  59.     struct passwd passwd;    /* ...guess... */
  60.     int done;            /* bool flag */
  61. };
  62.  
  63. struct DICT
  64. {
  65.     struct DICT *next;        /* simple linked list */
  66.     char word[1];        /* ...<snigger>... */
  67. };
  68.  
  69. /* include lyrics of "perfect circle" by R.E.M. at this point */
  70.  
  71. struct RULE
  72. {
  73.     struct RULE *next;
  74.     char *rule;
  75. };
  76.  
  77. #define STRCMP(x,y)        ( *(x) == *(y) ? strcmp((x),(y)) : -1 )
  78.  
  79. #include "crack-glob.h"
  80.